<!DOCTYPE html>
<html>

<head>
    <title> New Document </title>
    <meta name="Generator" content="EditPlus">
    <meta name="Author" content="">
    <meta name="Keywords" content="">
    <meta name="Description" content="">

    <script src="./jquery-3.6.0.min.js"></script>

    <script type="text/javascript">
        $(function() {
            alert($('.test :hidden').length); //选择class为test的元素当中的隐藏子元素
            alert($('.test:visible').length); //选择隐藏的class为test的元素
        });
    </script>


</head>

<body>

    <div class="test">
        <div style="display:none">aaaa</div>
        <div style="display:none">bbbb</div>
        <div style="display:none">cccc</div>
        <div class="test" style="display:none">dddd</div>
    </div>

    <div class="test" style="display:none">eeee</div>



</body>

</html>